import request from '@/utils/request'

// 查询集中器管理列表
export function listConcentrator(query) {
  return request({
    url: '/basedata/concentrator/list',
    method: 'get',
    params: query
  })
}

// 查询集中器管理详细
export function getConcentrator(ID) {
  return request({
    url: '/basedata/concentrator/' + ID,
    method: 'get'
  })
}

// 新增集中器管理
export function addConcentrator(data) {
  return request({
    url: '/basedata/concentrator',
    method: 'post',
    data: data
  })
}

// 修改集中器管理
export function updateConcentrator(data) {
  return request({
    url: '/basedata/concentrator',
    method: 'put',
    data: data
  })
}

// 删除集中器管理
export function delConcentrator(ID) {
  return request({
    url: '/basedata/concentrator/' + ID,
    method: 'delete'
  })
}

// 集中器下拉框数据
export function concentratorOption() {
  return request({
    url: '/basedata/concentrator/all',
    method: 'get'
  })
}

// 集中器命令下发
export function sendCommand(data) {
  return request({
    url: '/basedata/concentrator/sendCommand',
    method: 'post',
    data: data
  })
}
// 获取记录
export function getFeedbackLog(query){
  return request({
    url: '/basedata/concentratorcommandlogs/list',
    method: 'get',
    params: query
  })
}
// 集中器绑定户表
export function bindTerminalsXb(query){
  return request({
    url: 'basedata/concentrator/bindTerminalsXb',
    method: 'post',
    data: query
  })
}
